package com.education.service.ucenter.service;

import com.education.dto.MemberDto;
import com.education.service.ucenter.entity.Member;
import com.baomidou.mybatisplus.extension.service.IService;
import com.education.service.ucenter.entity.form.LoginForm;
import com.education.service.ucenter.entity.form.RegisterForm;

/**
 * <p>
 * 会员表 服务类
 * </p>
 *
 * @author Lance
 * @since 2020-07-04
 */
public interface MemberService extends IService<Member> {

    /**
     * 会员注册
     * @param registerForm
     */
    void register(RegisterForm registerForm);

    /**
     * 用户登录
     * @param loginForm
     * @return
     */
    String login(LoginForm loginForm);

    /**
     * 根据openid返回用户信息
     * @param openid
     * @return
     */
    Member getByOpenid(String openid);

    /**
     * 根据会员ID查询会员信息
     * @param memberId
     * @return
     */
    MemberDto getMemberDtoById(String memberId);

    /**
     * 根据日期统计用户注册数量
     * @param day
     * @return
     */
    Integer countRegisterNum(String day);
}
